package handler;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class BeanNameUrlHandler implements Controller {
    @Override
    /*
     * 处理HttpServlet请求并返回调度器服务将呈现的ModelAndView对象
     */
    public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
        // viewName：要渲染的视图的名称，由DispatcherServlet的ViewResolver解析
        ModelAndView modelAndView = new ModelAndView("third");
        return modelAndView.addObject("bean名称url处理器映射");
    }
}
